package mainPackage;

public class BubbleSorter {
    public static void sort(char[] data) {
        for (int barrier = 0; barrier <= data.length - 1; barrier++) {
            for (int index = (data.length - 1); index > barrier; index--) {
                if (data[index] < data[index - 1]) {
                    char tmp = data[index];
                    data[index] = data[index - 1];
                    data[index - 1] = tmp;
                }
            }
        }
    }
}
